package com.ghca.myinfo3.project.entity;


import com.fasterxml.jackson.annotation.JsonFormat;
import com.ghca.myinfo3.common.eneity.IDEntity;
import com.ghca.myinfo3.entity.owner.Owner;

import javax.persistence.*;
import java.io.Serializable;
import java.util.Date;

/**
 * Created by Administrator on 2016/12/17.
 */
@Entity
public class BidProject extends IDEntity implements Project {


    private String name;  //工程名称

    private String address;  //工程地点

    @Column(length = 1024)
    private String content;     //工程内容

    @ManyToOne
    private Owner owner;  //工程业主

    private String period;      //工程工期

    private String url;//公告网址路径

    @JsonFormat
    private Date startDate;  // 发布时间

    private Date endDate; //截至时间

    private String region;  //所属地区

    @Column(length = 1024)
    private String requriement;


    @Override
    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    @Override
    public String getAddress() {
        return address;
    }

    public void setAddress(String address) {
        this.address = address;
    }


    @Override
    public String getContent() {
        return content;
    }

    public void setContent(String content) {
        this.content = content;
    }

    @Override
    public String getPeriod() {
        return period;
    }

    public void setPeriod(String period) {
        this.period = period;
    }

    @Override
    public Owner getOwner() {
        return owner;
    }

    public void setOwner(Owner owner) {
        this.owner = owner;
    }

    public String getRequriement() {
        return requriement;
    }

    public void setRequriement(String requriement) {
        this.requriement = requriement;
    }

    public String getUrl() {
        return url;
    }

    public void setUrl(String url) {
        this.url = url;
    }

    public String getRegion() {
        return region;
    }

    public void setRegion(String region) {
        this.region = region;
    }

    public Date getStartDate() {
        return startDate;
    }

    public void setStartDate(Date startDate) {
        this.startDate = startDate;
    }

    public Date getEndDate() {
        return endDate;
    }

    public void setEndDate(Date endDate) {
        this.endDate = endDate;
    }

    @Override
    public Integer getStatus() {
        return Project.STATUS_BID;
    }

    @Override
    public String toString() {
        return "BidProject{" +
                "name='" + name + '\'' +
                ", address='" + address + '\'' +
                ", content='" + content + '\'' +
                ", owner=" + owner +
                ", period='" + period + '\'' +
                '}';
    }
}
